
/**
  * @description 将动态路由和静态路由进行合并
  *
  *
  */

// 导入静态路由
import { constantRoutes } from '@/router'

export default {
  namespaced: true, // 开启命名空间
  state: {
    routes: constantRoutes
  },
  mutations: {
    setRouter(state, asyncRoute) {
      state.routes = [...constantRoutes, ...asyncRoute]
    }
  }
}
